Add shared monitor dispatcher scheduler#107
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd010b72bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "strategy_profile": runtime_target.get("strategy_profile"), | ||
| "account_scope": runtime_target.get("account_scope"), | ||
| "runtime_target_enabled": os.environ.get("RUNTIME_TARGET_ENABLED", "true"), | ||
| "scheduler": runtime_target.get("scheduler") if isinstance(runtime_target.get("scheduler"), dict) else {}, |
There was a problem hiding this comment.
Populate dispatcher targets with resolved monitor times
When RUNTIME_TARGET_JSON does not include a scheduler block, this writes MONITOR_DISPATCH_TARGETS_JSON with an empty scheduler even though the workflow still resolves CLOUD_SCHEDULER_PROBE_TIME/CLOUD_SCHEDULER_PRECHECK_TIME or the defaults later and then deletes the legacy probe/precheck jobs. In that common env/default configuration, /monitor-dispatch has no probe_time or precheck_time to match, so the shared scheduler will silently stop invoking /probe and /dry-run; include the same resolved monitor times in this target JSON before removing the old jobs.
Useful? React with 👍 / 👎.
| fields = schedule.split() | ||
| if len(fields) != 5: | ||
| return False |
There was a problem hiding this comment.
Accept the two-field monitor schedule format
The workflow continues to accept two-field schedule values such as the defaults 35 9,15 and 45 9, but the dispatcher rejects anything that is not already a five-field cron expression. If a runtime target carries probe_time or precheck_time in the same two-field format used by the workflow variables, this path always returns false, so those monitor windows are never dispatched after the legacy scheduler jobs are deleted.
Useful? React with 👍 / 👎.
Summary
Tests